<template>
  <div id="app">
    <div class="left">
      <LEFT @sendData="sendDataHeadler" />
    </div>
    <div class="right">
      <div class="top">
        <Top />
      </div>
      <div class="content">
        <component :is="content"></component>
      </div>
      <div class="bottom"></div>
    </div>
  </div>
</template>

<script>
import LEFT from "./components/Left.vue"
import Top from "./components/Top1.vue"
import Index from "./page/Index"
import examination from "./page/examination.vue"
import Grade from "./page/Grade.vue";
import Lessons1 from "./page/Lessons1.vue"
import Teacher from "./page/Teacher.vue";
export default {
  name: "App",
  components: {
    LEFT,
    Top,
    Index,
    examination,
    Grade,
    Lessons1,
    Teacher,
  },
  data() {
    return {
      content: "Index",
    };
  },
  methods: {
    sendDataHeadler(data) {
      this.content = data;
      console.log(data);
    },
  },
};
</script>

<style>
* {
  margin: 0;
  padding: 0;
}
#app {
  display: flex;
  box-sizing: border-box;
}
.left {
  width: 200px;
  height: 100vh;
  background-color: #2a303e;
  box-sizing: border-box;
}
.right {
  flex: 1;
  height: 100vh;
  background-color: #eeeff3;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  justify-content: center;
}
.top,
.bottom {
  height: 70px;
  background-color: #3d4a5d;
  box-sizing: border-box;
}
.content {
  height: 100%;
  background-color: #f5f5f5;
  box-sizing: border-box;
}
h2 {
  text-align: center;
}
</style>